
//
//  CapturePhotoModel.m
//  Rail
//
//  Created by hychen on 2018/5/1.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "CapturePhotoModel.h"
#import "UIImage+DP.h"

@implementation CapturePhotoModel

+ (instancetype)addPhotoModel {
    CapturePhotoModel *model = [CapturePhotoModel new];
    model.addPhoto = YES;
    model.image = [UIImage imageNamed:@"app_add_picture_img"];
    return model;
}

- (instancetype)initWithImage:(UIImage *)image {
    if (self = [super init]) {
        self.image = image;
        if (image) {
            dispatch_async(dispatch_get_global_queue(0, 0), ^{
                _uploadImage = [image zipImage];
            });
        }
    }
    return self;
}

@end
